package org.pro.core.properties;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * 启动自定义配置的属性
 * @author luoqiz
 *
 */
@Configuration
@EnableConfigurationProperties(SecurityProperties.class)
public class SystemSecurityConfig {

	/**
	 * 声明一个密码加密器
	 * @return
	 */
	@Bean
	public PasswordEncoder passwordEncoder() {
		return new BCryptPasswordEncoder();
	}
	
}
